home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-03-29 | 584 b | 32 lines | [TEXT/MPS ] |
- PROGRAM Test;
-
- { Can be built using the MacApp command 'MABuild HandleExample' }
-
- USES
- UMacApp;
-
- TYPE
- TShapeHdl = ^TShapePtr;
- TShapePtr = ^TShape;
- TShape = RECORD
- fBounds: Rect;
- fColor: RGBColor;
- END;
-
- VAR
- aShape: TShapeHdl;
- sameShape, copiedShape: TShapeHdl;
-
- BEGIN
- aShape := TShapeHdl(NewHandle(SIZEOF(TShape)));
- FailNIL(aShape);
-
- aShape^^.fBounds := gZeroRect;
- aShape^^.fColor := gRGBBlack;
-
- sameShape := aShape;
-
- copiedShape := aShape;
- FailOSErr(HandToHand(Handle(copiedShape)));
- FailNIL(copiedShape);
- END.